<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Vite + Vue + TS</title>
  </head>
  <body>
    <div id="app"></div>
    <script type="module" src="/src/main.ts"></script>
  </body>
</html>
<script>
  window.addEventListener('resize', () => {
    const screenWidth = window.innerWidth
    const baseFontSize = 16 // 当屏幕宽度为1920px时的字体大小
    const baseScreenWidth = 1920

    const fontSize = (screenWidth / baseScreenWidth) * baseFontSize

    // 假设你想要改变的是body元素的字体大小
    document.documentElement.style.fontSize = `${fontSize}px`
  })

  // 初始设置
  window.dispatchEvent(new Event('resize'))
</script>
